﻿{#foreach $T.Items as lstReport}
<tr class="{COMMON.getRowStyle($T.lstReport$index + 1)}">
    <td>
        {$T.lstReport.RowNumber}
    </td>
    <td>
        BICC_REP_{$T.lstReport.Department}_{$T.lstReport.ReportCode}
    </td>
    <td style="text-align: left">
        {#if $T.lstReport.RLDescription != ''}
            <a href="javascript:;" class="spanTooltip {COMMON.getStyleByStatus($T.lstReport.StatusComplete)}" title="{$T.lstReport.RLDescription}">{$T.lstReport.ReportName}</a>
        {#else}
            <a class="{COMMON.getStyleByStatus($T.lstReport.StatusComplete)}" href="javascript:;">{$T.lstReport.ReportName}</a>
        {#/if}

        {#if $T.lstReport.Description != null}
            <img style="cursor: pointer; float: right;" class="spanTooltip" title="{$T.lstReport.Description}" src="" />
        {#/if}
    </td>
    <td>
        {$T.lstReport.Department}
    </td>
    <td>
        {$T.lstReport.Frequency}
    </td>

    <td style="text-align: center">
        {COMMON.jSonDateToString($T.lstReport.DateExpire, 0)} 
    </td>
    <td>
        {$T.lstReport.Account}
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.AccountUpload != null}
        {$T.lstReport.AccountUpload}
        {#/if}
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.DateUpload != null}            
            {COMMON.jSonDateToString($T.lstReport.DateUpload, 2)}
        {#/if}
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.StatusComplete == 'On Time'}
            <img title="Ontime" src="" />
        {#elseif $T.lstReport.StatusComplete == 'Delay'}
            <img title="Delay" src="" />
        {#elseif $T.lstReport.StatusComplete == 'Pending'}
            <img title="Pending" src="" />            
        {#elseif $T.lstReport.StatusComplete == 'Ongoing'}
            <img title="Ongoing" src="" />            
        {#else}
            {$T.lstReport.StatusComplete}
        {#/if}
    </td>
    
    <td>
        {#if $T.lstReport.DateUpload != null}
            <a style="display: table; width: 100%; text-align: center" href="javascript:;" onclick="page_ViewReport.download('{$T.lstReport.FileName}','{$T.lstReport.TimeKeyData}');"><img src="" /></a>
        {#/if} 
    </td>
</tr>
{#/for}